﻿<%@ Page Title="" Language="C#" MasterPageFile="../Shared/List.Master" Inherits="System.Web.Mvc.ViewPage<Longtop.Web.WebSite.Admin.Cases.ListModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <thead>
        <tr>
            <th>
                编号
            </th>
            <th>
                标题
            </th>
            <th>
                缩略图
            </th>
            <th>
                发布者
            </th>
            <th>
                发布时间
            </th>
            <th>
            </th>
        </tr>
    </thead>
    <tbody>
        <% foreach (var item in Model.PagedList) { %>
        <tr>
            <td>
                <%= Html.Encode(item.CaseId) %>
            </td>
            <td>
                <%=item.Title%>
            </td>
            <td>
                <%=string.IsNullOrEmpty(item.Logo) ? "": Html.Image(item.Logo, new { width = 50, alt = item.Title }).ToHtmlString()%>
            </td>
            <td>
                <%=item.Name%>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.CreateDT)) %>
            </td>
            <td>
                <%= Html.ActionLink("编辑", "Edit", new {  id=item.CaseId}) %>
                |<%= Html.ActionLink("删除", "Delete", new {  id=item.CaseId}) %>
            </td>
        </tr>
    </tbody>
    <% } %>

    <script type="text/javascript">
        $(function() {

            if (!$('#list img:first').is('img'))
                $('th:contains("缩略图")').remove().parent('tr').nextAll('tr td:eq(2)').remove();
        });
    </script>

</asp:Content>
<asp:Content ID="Pager" ContentPlaceHolderID="Pager" runat="server">
    <%=Html.Pager(Model) %>
</asp:Content>
